package net.qiqb.usr.points.application;

import lombok.Getter;
import net.qiqb.usr.custom.client.types.CustomerId;
import net.qiqb.usr.points.domain.Points;
import net.qiqbframework.modelling.command.Cmd;
import net.qiqbframework.modelling.command.FetchHandler;

/**
 * 计算积分等级命令
 */
@Getter
//@Cmd(Points.class)
public class CreatePointsCmd {


    private final CustomerId customerId;


    public CreatePointsCmd(CustomerId customerId) {
        this.customerId = customerId;
    }

    @FetchHandler
    public Points fetch() {
        // AggregateContext.updateFetchSource(FetchSource.LOAD.getValue());
        return new Points(customerId);
    }
}
